﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SharpDX;
using SharpDX.XAPO;
using SharpDX.XAudio2;
using SynergyLib.SMath;
namespace XAudio2Controls
{
    public abstract class AudioProcessorBase<T> : SharpDX.XAPO.AudioProcessorBase<T> where T : struct
    {
        protected int Counter;

        protected AudioProcessorBase()
        {
            RegistrationProperties = new RegistrationProperties()
            {
                Clsid = Utilities.GetGuidFromType(typeof(AudioProcessorBase<>)),
                CopyrightInfo = "Copyright",
                FriendlyName = this.ToString(),
                MaxInputBufferCount = 100,
                MaxOutputBufferCount = 100,
                MinInputBufferCount = 100,
                MinOutputBufferCount = 100,
                Flags = PropertyFlags.Default
            };           
        }     

        /// <summary>
        /// Returns the SampleRate for audio signal.
        /// </summary>
        protected int Fs
        {
            get { return InputFormatLocked.SampleRate; }
        }

        public float Intensity
        { get; set; }

        protected float NextIntensity
        { get { return Intensity / 100; } }

    }
}
